# include <stdio.h>
int main()
{
	int a,b,c,n;
	scanf("%d",&n);
	a=1;
	b=1;
	c=0;
	while(c <= n)
	{
		a=a*2;
		c=c+a;
		//printf("%d,%d,%d\n",a,b,c);
		if (c>n)
		   {
		   printf("%.2f",0.8*(c-a)/(b-1));
		   break ;
	       }
	    else
		    b++;
	}

	return 0;
}
